<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' type="text/css" href='media/css/stylebis.css' />
<title>site évènementiel</title>

<script>
			function affichagePopup(acceuilbis, inscription)
			{
			window.open (acceuilbis, inscription, config='top=200px, left=400px, height=400, width=500, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
			}
</script>
</head>
<body>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
<a href="http://twitter.com/share" class="twitter-share-button" count="horizontal">Tweet</a>
<div class="fb-like" data-href="https://www.facebook.com/pages/Events/471574096212120" data-send="true" data-width="450" data-show-faces="true"></div>
	<div id='page'>

		<section>
		<div id="slide">
            <a id="image1" class="ancre"></a>
            <a id="image2" class="ancre"></a>
            <a id="image3" class="ancre"></a>
            <a id="image4" class="ancre"></a>
            <div id="liens">
                <ul>
                    <li><a href="#image1"><span>events1</span></a></li>
                    <li><a href="#image2"><span>events2</span></a></li>
                    <li><a href="#image3"><span>events3</span></a></li>
                    <li><a href="#image4"><span>events4</span></a></li>
                </ul>
            </div>
            <div id="imagebis">
                <ul>
               <?php
			foreach($slides as $slide)
			{
				?>
                    <li><img src='<?php echo $slide['chemin']; ?>' alt="" width='350' height='150' style='height:200px; width:450px;' /></br><span class='event1'><a href='index.php?page=desc_event&id=<?php echo $slide['id'];?>'><?php echo $slide['nom']; ?></a></span><br /><?php

			echo $slide['description'] . '<br /><br />';
			}

?>
 </li>
 <?php
			foreach($slide2 as $slide)
			{
				?>
                    <li><img src='<?php echo $slide['chemin']; ?>' alt="" width='350' height='150' style='height:200px; width:450px;' /></br><span class='event1'><a href='index.php?page=desc_event&id=<?php echo $slide['id'];?>'><?php echo $slide['nom']; ?></a></span><br /><?php

			echo $slide['description'] . '<br /><br />';
			}?></li>
<?php
			foreach($slide3 as $slide)
			{
				?>
                    <li><img src='<?php echo $slide['chemin']; ?>' alt="" width='350' height='150' style='height:200px; width:450px;' /></br><span class='event1'><a href='index.php?page=desc_event&id=<?php echo $slide['id'];?>'><?php echo $slide['nom']; ?></a></span><br /><?php

			echo $slide['description'] . '<br /><br />';
			}?></li><?php
			foreach($slide4 as $slide)
			{
				?>
                    <li><img src='<?php echo $slide['chemin']; ?>' alt="" width='350' height='150' style='height:200px; width:450px;' /></br><span class='event1'><a href='index.php?page=desc_event&id=<?php echo $slide['id'];?>'><?php echo $slide['nom']; ?></a></span><br /><?php

			echo $slide['description'] . '<br /><br />';
			}?></li>
                </ul>
            </div>
		</div>
		<div id='login'>
			<?php 
						if(!(isset($_SESSION['pseudo']))) { ?>
			<form method='post' action='controleurs/traitement_connexion.php'>
				<div>
				
					<fieldset>
						
						<label for='pseudo'> Pseudo: </label><br /> <input type='text'
							name='pseudo' id='pseudo' placeholder='pseudo' /><br /> <label
							for='mot_de_passe'> Mot de passe : </label><br /> <input
							type='password' name='mot_de_passe' id='mot_de_passe'
							placeholder='mot de passe' /><br />
					</fieldset>
					<br /> </span><input type="checkbox" name="sessionActive"
						id="sessionActive" /> <label class='sa' for="sessionActive">rester
						connecté </label><input type="submit"
						value="connexion" />
				<p>
			
			<?php }
						else { echo $_SESSION['pseudo'];?></p>
			<a href="controleurs/deconnexion.php">Déconnexion</a>
			<?php
						}
						?>
							
				</div>
			</form>
		</div>
		<legend> Derniers évènements ajoutés </legend> <br />
		<div class=' EventVenir'>
			<?php
			foreach($events as $event)
			{
				?>
			<span id='chemin'>
			<img src='<?php echo $event['chemin']; ?>' alt='moi'>
			</span>
			<?php 
			
			?>
			<span class='EventNom'><br/>
				
				<a href='index.php?page=desc_event&id=<?php echo $event['id'];?>'><?php echo $event['nom']; ?></a>
				
			</span>
			<div class='EventVenir_date'>
				<?php
				echo $event['dateDeb'] . '<br />';
				?>
			</div>

			<?php

			echo $event['description'] . '<br /><br />';
			}

?>
		</div>



		<div id='PassInscription'>

			<ul>
				<li><a href='index.php?page=contact'> Mot de passe oublié </a></li>
				<li><a href="javascript:affichagePopup('vues/inscription.php');">
						Inscription </a></li>
			</ul>

		</div>
		</section>

		<aside>


		<div id='top_evenement'>
			<h1>Top organisateur</h1>
			<div id='organisateur'>
				<?php
				$count=1;
				foreach($users as $user)
				{
					echo $count.'.';?>
					<span class= nomto><?php echo $user['pseudo'] . ' , ' ;?></span>
					<span class= paysto><?php echo $user['pays'] .'' ; ?></span><br />
					<?php 
					$count++;
				}
				?>
			</div>
		</div>

		<div id='calendrier'>
			<h1>Calendrier</h1>
			<?php 
			include 'controleurs/new_calender.php'
		?>
		</div>
	
	</div>
	</aside>

</body>	
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/fr_FR/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>